﻿<UserControl x:Class="AzureStorageExplorer.StorageView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="1024" d:DesignWidth="768"
             DataContext="{Binding RelativeSource={RelativeSource Self}}"
             >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <!-- Menu -->

        <DockPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <Menu DockPanel.Dock="Top">
                <MenuItem Header="_Storage Acccount">
                    <MenuItem Header="View _Connection String" Click="MenuItem_StorageAccount_ViewConnectionString_Click" />
                    <Separator />
                    <MenuItem Header="Close Tab" Click="MenuItem_StorageAccount_CloseTab_Click" />
                </MenuItem>
            </Menu>
        </DockPanel>

        <!-- Left Pane -->
        
        <Grid Grid.Row="1" Grid.Column="0" Background="DarkGray">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Orientation="Horizontal">
                <TextBlock Grid.Row="0" x:Name="AccountTitle" 
                           Margin="8" FontSize="14" FontWeight="Bold" Foreground="White">Account Title</TextBlock>
            </StackPanel>

            <!-- Left Pane Toolbar -->

            <StackPanel Grid.Row="1" x:Name="ContainerToolbarPanel" Orientation="Horizontal" Background="White" Visibility="Collapsed">
                <ToolBarTray x:Name="ContainerToolbarTray" Background="White" ToolBarTray.IsLocked="True"  IsManipulationEnabled="False">
                    <ToolBar Band="1" BandIndex="1">
                        <Button x:Name="ContainerRefresh" Width="54" ToolBar.OverflowMode="Never" ToolTip="Refresh Blob List" Click="AccountRefresh_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\refresh.png" Height="16" />
                                <TextBlock Text="Refresh"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="ButtonNewContainer" Width="54" ToolBar.OverflowMode="Never" ToolTip="Create New Blob Container" Click="NewContainer_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\new_container.png" Height="16" />
                                <TextBlock Text="New"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="ButtonDeleteContainer" Width="54" ToolBar.OverflowMode="Never" ToolTip="Delete Selected Blob Container" Click="DeleteContainer_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\delete_container.png" Height="16" />
                                <TextBlock Text="Delete"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="ButtonContainerAccess" Width="54" ToolBar.OverflowMode="Never" ToolTip="Set Container Access" Click="ContainerAccess_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image x:Name="ButtonContainerAccessIcon" Source="Images\private.png" Height="16" />
                                <TextBlock x:Name="ButtonContainerAccessLabel" Text="Security"/>
                            </StackPanel>
                        </Button>
                        <ToggleButton x:Name="ButtonBlobServiceCORS" Width="54" ToolBar.OverflowMode="Never" ToolTip="Enable/Disable Container CORS Access" Click="BlobServiceCORS_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image x:Name="ButtonBlobServiceCORSIcon" Source="Images\unchecked.png" Height="16" />
                                <TextBlock x:Name="ButtonBlobServiceCORSLabel" Text="CORS-"/>
                            </StackPanel>
                        </ToggleButton>
                    </ToolBar>
                </ToolBarTray>
            </StackPanel>
            <StackPanel Grid.Row="1" x:Name="QueueToolbarPanel" Orientation="Horizontal" Background="White" Visibility="Collapsed">
                <ToolBarTray x:Name="QueueToolbarTray" Background="White" ToolBarTray.IsLocked="True"  IsManipulationEnabled="False">
                    <ToolBar Band="1" BandIndex="1">
                        <Button x:Name="QueueRefresh" Width="54" ToolBar.OverflowMode="Never" ToolTip="Refresh Queue List" Click="AccountRefresh_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\refresh.png" Height="16" />
                                <TextBlock Text="Refresh"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="ButtonNewQueue" Width="54" ToolBar.OverflowMode="Never" ToolTip="Create New Queue" Click="NewQueue_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\new_container.png" Height="16" />
                                <TextBlock Text="New"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="ButtonDeleteQueue" Width="54" ToolBar.OverflowMode="Never" ToolTip="Delete Selected Queue" Click="DeleteQueue_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\delete_container.png" Height="16" />
                                <TextBlock Text="Delete"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>
                </ToolBarTray>
            </StackPanel>
            <StackPanel Grid.Row="1" x:Name="TableToolbarPanel" Orientation="Horizontal" Background="White" Visibility="Collapsed">
                <ToolBarTray x:Name="TableToolbarTray" Background="White" ToolBarTray.IsLocked="True"  IsManipulationEnabled="False">
                    <ToolBar Band="1" BandIndex="1">
                        <Button x:Name="TableRefresh" Width="54" ToolBar.OverflowMode="Never" ToolTip="Refresh Table List" Click="AccountRefresh_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\refresh.png" Height="16" />
                                <TextBlock Text="Refresh"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="ButtonNewTable" Width="54" ToolBar.OverflowMode="Never" ToolTip="Create New Table" Click="NewTable_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\new_container.png" Height="16" />
                                <TextBlock Text="New"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="ButtonDeleteTable" Width="54" ToolBar.OverflowMode="Never" ToolTip="Delete Selected Table" Click="DeleteTable_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\delete_container.png" Height="16" />
                                <TextBlock Text="Delete"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>
                </ToolBarTray>
            </StackPanel>
            <StackPanel Grid.Row="1" x:Name="FileShareToolbarPanel" Orientation="Horizontal" Background="White" Visibility="Collapsed">
                <ToolBarTray x:Name="FileShareToolbarTray" Background="White" ToolBarTray.IsLocked="True"  IsManipulationEnabled="False">
                    <ToolBar Band="1" BandIndex="1">
                        <Button x:Name="FileShareRefresh" Width="54" ToolBar.OverflowMode="Never" ToolTip="Refresh File Share List" Click="AccountRefresh_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\refresh.png" Height="16" />
                                <TextBlock Text="Refresh"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="ButtonNewFileShare" Width="54" ToolBar.OverflowMode="Never" ToolTip="Create New FileShare" Click="NewFileShare_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\new_container.png" Height="16" />
                                <TextBlock Text="New"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="ButtonDeleteFileShare" Width="54" ToolBar.OverflowMode="Never" ToolTip="Delete Selected FileShare" Click="DeleteFileShare_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\delete_container.png" Height="16" />
                                <TextBlock Text="Delete"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>
                </ToolBarTray>
            </StackPanel>

            <TreeView Grid.Row="2"  x:Name="AccountTreeView"  >
                <TreeView.Resources>
                    <SolidColorBrush Color="#DDDDDD" x:Key="{x:Static SystemColors.HighlightBrushKey}"/>
                </TreeView.Resources>
            </TreeView>
        </Grid>
        
        <!-- Main Pane -->

        <Grid Grid.Row="2" Grid.Column="1" Background="LightGray">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" x:Name="ContainerPanel" Orientation="Horizontal" Background="White">
                <Image x:Name="ContainerImage" Height="32" Width="32" Margin="12,0,0,0"></Image>
                <TextBlock x:Name="ContainerTitle" Padding="8" FontSize="14" FontWeight="Bold" Foreground="Black"></TextBlock>
                <TextBlock x:Name="ContainerType" Padding="0,8,8,8" FontSize="14" FontWeight="Normal" Foreground="Black"></TextBlock>
                <TextBlock x:Name="ContainerDetails" Padding="0,8,8,8" FontSize="14" FontWeight="Normal" Foreground="Black"></TextBlock>
            </StackPanel>
            
            <!-- Main Pane Toolbar -->
            
            <StackPanel Grid.Row="1" x:Name="BlobToolbarPanel" Orientation="Horizontal" Background="White" Visibility="Collapsed">
                <ToolBarTray x:Name="BlobToolbarTray" Background="White" ToolBarTray.IsLocked="True"  IsManipulationEnabled="False">
                    <ToolBar Band="1" BandIndex="1">
                        <Button x:Name="BlobRefresh" Width="54" ToolBar.OverflowMode="Never" ToolTip="Refresh Blob List" Click="BlobRefresh_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\refresh.png" Height="16" />
                                <TextBlock Text="Refresh"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="BlobSelectAll" Width="54" ToolBar.OverflowMode="Never" ToolTip="Select All Blobs" Click="BlobSelectAll_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\list.png" Height="16" />
                                <TextBlock Text="Select All"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="BlobClearSelection" Width="54" ToolBar.OverflowMode="Never" ToolTip="Clear Selection" Click="BlobClearSelection_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\clear.png" Height="16" />
                                <TextBlock Text="Clear All"/>
                            </StackPanel>
                        </Button>
                        <ToggleButton x:Name="BlobFilter" Width="54" ToolBar.OverflowMode="Never" ToolTip="Filter Selection" Click="BlobFilter_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\filter.png" Height="16" />
                                <TextBlock Text="Filter"/>
                            </StackPanel>
                        </ToggleButton>
                    </ToolBar>
                    <ToolBar Band="1" BandIndex="2">
                        <Button x:Name="BlobUploadButton" Width="54" ToolBar.OverflowMode="Never" ToolTip="Upload Files" Click="BlobUploadButton_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\upload-blob.png" Height="16" />
                                <TextBlock Text="Upload"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="BlobDownloadButton" Width="54" ToolBar.OverflowMode="Never" ToolTip="Download Selected Blobs"  Click="BlobDownloadButton_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\download-blob.png" Height="16" />
                                <TextBlock Text="Downld"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>
                    <ToolBar Band="1" BandIndex="3">
                        <Button x:Name="BlobView" Width="54" ToolTip="View Blob Properties" ToolBar.OverflowMode="Never" Click="BlobViewProperties_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\properties.png" Height="16" />
                                <TextBlock Text="View"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="BlobNew" Width="54" ToolTip="Create New Blob" ToolBar.OverflowMode="Never" Click="BlobNew_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\new_blob.png" Height="16" />
                                <TextBlock Text="New"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="BlobCopy" Width="54" ToolTip="Copy Selected Blob" ToolBar.OverflowMode="Never" Click="BlobCopy_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\copy.png" Height="16" />
                                <TextBlock Text="Copy"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="BlobDelete" Width="54" ToolBar.OverflowMode="Never" ToolTip="Delete Selected Blobs" Click="BlobDelete_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\delete.png" Height="16" />
                                <TextBlock Text="Delete"/>
                            </StackPanel>
                        </Button>

                    </ToolBar>
                </ToolBarTray>
            </StackPanel>

            <StackPanel Grid.Row="1" x:Name="MessageToolbarPanel" Orientation="Horizontal" Background="White" Visibility="Collapsed">
                <ToolBarTray x:Name="MessageToolbarTray" Background="White" ToolBarTray.IsLocked="True" IsManipulationEnabled="False">
                    <ToolBar Band="1" BandIndex="1">
                        <Button x:Name="MessageRefresh" Width="54" ToolBar.OverflowMode="Never" ToolTip="Refresh Message List" Click="MessageRefresh_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\refresh.png" Height="16" />
                                <TextBlock Text="Refresh"/>
                            </StackPanel>
                        </Button>
                        <!--<Button x:Name="MessageSelectAll" Width="54" ToolBar.OverflowMode="Never" ToolTip="Select All Messages" Click="MessageSelectAll_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\list.png" Height="16" />
                                <TextBlock Text="Select All"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="MessageClearSelection" Width="54" ToolBar.OverflowMode="Never" ToolTip="Clear Selection" Click="MessageClearSelection_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\clear.png" Height="16" />
                                <TextBlock Text="Clear All"/>
                            </StackPanel>
                        </Button>
                        <ToggleButton x:Name="MessageFilter" Width="54" ToolBar.OverflowMode="Never" ToolTip="Filter Selection" Click="MessageFilter_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\filter.png" Height="16" />
                                <TextBlock Text="Filter"/>
                            </StackPanel>
                        </ToggleButton>-->
                    </ToolBar>
                    <!--<ToolBar Band="1" BandIndex="2">
                        <Button x:Name="MessageUploadButton" Width="54" ToolBar.OverflowMode="Never" ToolTip="Upload Files" Click="MessageUploadButton_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\upload-blob.png" Height="16" />
                                <TextBlock Text="Upload"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="MessageDownloadButton" Width="54" ToolBar.OverflowMode="Never" ToolTip="Download Selected Blobs"  Click="MessageDownloadButton_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\download-blob.png" Height="16" />
                                <TextBlock Text="Downld"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>-->
                    <ToolBar Band="1" BandIndex="3">
                        <!--<Button x:Name="MessageView" Width="54" ToolTip="View Message Properties" ToolBar.OverflowMode="Never" Click="BlobViewProperties_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\properties.png" Height="16" />
                                <TextBlock Text="View"/>
                            </StackPanel>
                        </Button>-->
                        <Button x:Name="MessageNew" Width="54" ToolTip="Create New Message" ToolBar.OverflowMode="Never" Click="MessageNew_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\new_blob.png" Height="16" />
                                <TextBlock Text="New"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="MessageCopy" Width="54" ToolTip="Copy Selected Message" ToolBar.OverflowMode="Never" Click="MessageCopy_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\copy.png" Height="16" />
                                <TextBlock Text="Copy"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="MessagePop" Width="54" ToolBar.OverflowMode="Never" ToolTip="Pop (Delete) Top Message" Click="MessagePop_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\delete.png" Height="16" />
                                <TextBlock Text="Pop"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>
                </ToolBarTray>
            </StackPanel>

            <StackPanel Grid.Row="1" x:Name="EntityToolbarPanel" Orientation="Horizontal" Background="White" Visibility="Collapsed">
                <ToolBarTray x:Name="EntityToolbarTray" Background="White" ToolBarTray.IsLocked="True" IsManipulationEnabled="False">
                    <ToolBar Band="1" BandIndex="1">
                        <Button x:Name="EntityRefresh" Width="54" ToolBar.OverflowMode="Never" ToolTip="Refresh Entity List" Click="EntityRefresh_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\refresh.png" Height="16" />
                                <TextBlock Text="Refresh"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="EntitySelectAll" Width="54" ToolBar.OverflowMode="Never" ToolTip="Select All Entities" Click="EntitySelectAll_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\list.png" Height="16" />
                                <TextBlock Text="Select All"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="EntityClearSelection" Width="54" ToolBar.OverflowMode="Never" ToolTip="Clear Selection" Click="EntityClearSelection_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\clear.png" Height="16" />
                                <TextBlock Text="Clear All"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>
                    <ToolBar Band="1" BandIndex="2">
                        <ToggleButton x:Name="EntityQuery" Width="54" ToolBar.OverflowMode="Never" ToolTip="Set Query Conditions" Click="EntityQuery_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\query.png" Height="16" />
                                <TextBlock Text="Query"/>
                            </StackPanel>
                        </ToggleButton>
                        <ToggleButton x:Name="EntityFilter" Width="54" ToolBar.OverflowMode="Never" ToolTip="Filter Selection" Click="EntityFilter_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\filter.png" Height="16" />
                                <TextBlock Text="Filter"/>
                            </StackPanel>
                        </ToggleButton>
                    </ToolBar>
                    <ToolBar Band="1" BandIndex="3">
                        <Button x:Name="EntityUploadButton" Width="54" ToolBar.OverflowMode="Never" ToolTip="Upload Entities" Click="EntityUploadButton_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\upload-blob.png" Height="16" />
                                <TextBlock Text="Upload"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="EntityDownloadButton" Width="54" ToolBar.OverflowMode="Never" ToolTip="Download Selected Entities"  Click="EntityDownloadButton_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\download-blob.png" Height="16" />
                                <TextBlock Text="Downld"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>
                    <ToolBar Band="1" BandIndex="4">
                        <Button x:Name="EntityView" Width="54" ToolTip="View/Edit Selected Entity" ToolBar.OverflowMode="Never" Click="EntityView_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\properties.png" Height="16" />
                                <TextBlock Text="View"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="EntityNew" Width="54" ToolTip="Insert New Entity" ToolBar.OverflowMode="Never" Click="EntityNew_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\new_blob.png" Height="16" />
                                <TextBlock Text="New"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="EntityCopy" Width="54" ToolTip="Copy Selected Entity" ToolBar.OverflowMode="Never" Click="EntityCopy_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\copy.png" Height="16" />
                                <TextBlock Text="Copy"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="EntityDelete" Width="54" ToolBar.OverflowMode="Never" ToolTip="Delete Selected Entities" Click="EntityDelete_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\delete.png" Height="16" />
                                <TextBlock Text="Delete"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>

                </ToolBarTray>
            </StackPanel>

            <StackPanel Grid.Row="1" x:Name="FileToolbarPanel" Orientation="Horizontal" Background="White" Visibility="Collapsed">
                <ToolBarTray x:Name="FileToolbarTray" Background="White" ToolBarTray.IsLocked="True" IsManipulationEnabled="False">
                    <ToolBar Band="1" BandIndex="1">
                        <Button x:Name="FileRefresh" Width="54" ToolBar.OverflowMode="Never" ToolTip="Refresh File List" Click="FileRefresh_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\refresh.png" Height="16" />
                                <TextBlock Text="Refresh"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="FileSelectAll" Width="54" ToolBar.OverflowMode="Never" ToolTip="Select All Entities" Click="FileSelectAll_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\list.png" Height="16" />
                                <TextBlock Text="Select All"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="FileClearSelection" Width="54" ToolBar.OverflowMode="Never" ToolTip="Clear Selection" Click="FileClearSelection_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\clear.png" Height="16" />
                                <TextBlock Text="Clear All"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>
                    <ToolBar Band="1" BandIndex="2">
                        <ToggleButton x:Name="FileQuery" Width="54" ToolBar.OverflowMode="Never" ToolTip="Set Query Conditions" Click="FileQuery_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\query.png" Height="16" />
                                <TextBlock Text="Query"/>
                            </StackPanel>
                        </ToggleButton>
                        <ToggleButton x:Name="FileFilter" Width="54" ToolBar.OverflowMode="Never" ToolTip="Filter Selection" Click="FileFilter_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\filter.png" Height="16" />
                                <TextBlock Text="Filter"/>
                            </StackPanel>
                        </ToggleButton>
                    </ToolBar>
                    <ToolBar Band="1" BandIndex="3">
                        <Button x:Name="FileUploadButton" Width="54" ToolBar.OverflowMode="Never" ToolTip="Upload Entities" Click="FileUploadButton_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\upload-blob.png" Height="16" />
                                <TextBlock Text="Upload"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="FileDownloadButton" Width="54" ToolBar.OverflowMode="Never" ToolTip="Download Selected Entities"  Click="FileDownloadButton_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\download-blob.png" Height="16" />
                                <TextBlock Text="Downld"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>
                    <ToolBar Band="1" BandIndex="4">
                        <Button x:Name="FileView" Width="54" ToolTip="View/Edit Selected File" ToolBar.OverflowMode="Never" Click="FileView_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\properties.png" Height="16" />
                                <TextBlock Text="View"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="FileNew" Width="54" ToolTip="Insert New File" ToolBar.OverflowMode="Never" Click="FileNew_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\new_blob.png" Height="16" />
                                <TextBlock Text="New"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="FileCopy" Width="54" ToolTip="Copy Selected File" ToolBar.OverflowMode="Never" Click="FileCopy_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\copy.png" Height="16" />
                                <TextBlock Text="Copy"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="FileDelete" Width="54" ToolBar.OverflowMode="Never" ToolTip="Delete Selected Entities" Click="FileDelete_Click" >
                            <StackPanel Orientation="Vertical">
                                <Image Source="Images\delete.png" Height="16" />
                                <TextBlock Text="Delete"/>
                            </StackPanel>
                        </Button>
                    </ToolBar>

                </ToolBarTray>
            </StackPanel>

            <ListView Grid.Row="2" x:Name="ContainerListView" 
                      GridViewColumnHeader.Click="ContainerListView_ColumnHeaderClicked" 
                      MouseDoubleClick="ContainerListView_MouseDoubleClick"
                      AlternationCount="2" Visibility="Collapsed" ItemsSource="{Binding BlobCollection}">
                <ListView.Resources>
                    <!--<SolidColorBrush Color="#DDDDDD" x:Key="{x:Static SystemColors.HighlightBrushKey}"/>-->
                    <Style TargetType="{x:Type ListViewItem}">
                        <Style.Triggers>
                            <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                                <Setter Property="Background" Value="#F0F0F0"></Setter>
                            </Trigger>
                            <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                                <Setter Property="Background" Value="#F6F6F6"></Setter>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Background" Value="#FFE79A"/>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </ListView.Resources>
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="140" Header="Name" DisplayMemberBinding="{Binding Name}" />
                        <GridViewColumn Width="40" Header="Type" DisplayMemberBinding="{Binding BlobType}" />
                        <GridViewColumn Width="170" Header="Last Modified" DisplayMemberBinding="{Binding LastModifiedText}" />
                        <GridViewColumn Width="70" Header="Length" DisplayMemberBinding="{Binding LengthText}" />
                        <GridViewColumn Width="140" Header="Content Type" DisplayMemberBinding="{Binding ContentType}" />
                        <GridViewColumn Width="140" Header="Encoding"  DisplayMemberBinding="{Binding Encoding}" />
                        <GridViewColumn Width="140" Header="ETag"  DisplayMemberBinding="{Binding ETag}" />
                        <GridViewColumn Width="140" Header="Copy State"  DisplayMemberBinding="{Binding CopyState}" />
                    </GridView>
                </ListView.View>
            </ListView>

            <ListView Grid.Row="2" x:Name="MessageListView" 
                      GridViewColumnHeader.Click="MessageListView_ColumnHeaderClicked" 
                      AlternationCount="2" Visibility="Collapsed" ItemsSource="{Binding MessageCollection}">
                <ListView.Resources>
                    <Style TargetType="{x:Type ListViewItem}">
                        <Style.Triggers>
                            <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                                <Setter Property="Background" Value="#F0F0F0"></Setter>
                            </Trigger>
                            <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                                <Setter Property="Background" Value="#F6F6F6"></Setter>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Background" Value="#C5E084"/>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </ListView.Resources>
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="140" Header="Id" DisplayMemberBinding="{Binding Id}" />
                        <!--<GridViewColumn Width="170" Header="BytesValue" DisplayMemberBinding="{Binding BytesValue}" />-->
                        <GridViewColumn Width="170" Header="StringValue" DisplayMemberBinding="{Binding StringValue}" />
                        <GridViewColumn Width="60" Header="DQCount" DisplayMemberBinding="{Binding DequeueCount}" />
                        <GridViewColumn Width="100" Header="PopReceipt" DisplayMemberBinding="{Binding PopReceipt}" />
                        <GridViewColumn Width="120" Header="InsertionTime" DisplayMemberBinding="{Binding InsertionTime}" />
                        <GridViewColumn Width="120" Header="ExpirationTime"  DisplayMemberBinding="{Binding ExpirationTime}" />
                        <GridViewColumn Width="120" Header="NextVisibleTime"  DisplayMemberBinding="{Binding NextVisibleTime}" />
                     </GridView>
                </ListView.View>
            </ListView>

            <ListView Grid.Row="2" x:Name="TableListView" 
                      GridViewColumnHeader.Click="EntityListView_ColumnHeaderClicked" 
                      MouseDoubleClick="TableListView_MouseDoubleClick"
                      AlternationCount="2" Visibility="Collapsed" ItemsSource="{Binding EntityCollection}">
                <ListView.Resources>
                    <Style TargetType="{x:Type ListViewItem}">
                        <Style.Triggers>
                            <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                                <Setter Property="Background" Value="#F0F0F0"></Setter>
                            </Trigger>
                            <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                                <Setter Property="Background" Value="#F6F6F6"></Setter>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Background" Value="#DEEBF7"/>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </ListView.Resources>
                <ListView.View>
                    
                    
                    
                    
                    
                    <GridView x:Name="TableListViewGridView">
                    </GridView>
                </ListView.View>
            </ListView>

            <ListView Grid.Row="2" x:Name="FileListView" 
                      GridViewColumnHeader.Click="EntityListView_ColumnHeaderClicked" 
                      MouseDoubleClick="TableListView_MouseDoubleClick"
                      AlternationCount="2" Visibility="Collapsed" ItemsSource="{Binding FileCollection}">
                <ListView.Resources>
                    <Style TargetType="{x:Type ListViewItem}">
                        <Style.Triggers>
                            <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                                <Setter Property="Background" Value="#F0F0F0"></Setter>
                            </Trigger>
                            <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                                <Setter Property="Background" Value="#F6F6F6"></Setter>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Background" Value="#DEEBF7"/>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </ListView.Resources>
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="200" Header="FileName" DisplayMemberBinding="{Binding FileName}" />
                        <GridViewColumn Width="180" Header="ParentDirectoryName" DisplayMemberBinding="{Binding DirectoryName}" />
                        <GridViewColumn Width="90" Header="IsDirectory" DisplayMemberBinding="{Binding IsDirectory}" />
                        <GridViewColumn Width="100" Header="size" DisplayMemberBinding="{Binding size}" />
                        <GridViewColumn Width="70" Header="SubItemCount" DisplayMemberBinding="{Binding SubItemCount}" />

                        <GridViewColumn Width="70" Header="LastModifiedText" DisplayMemberBinding="{Binding LastModifiedText}" />
                      
                    </GridView>
                   
                </ListView.View>
            </ListView>

            <TextBlock x:Name="StatusMessage" Grid.Row="3" Padding="4" LineHeight="12" Background="AliceBlue" Visibility="Collapsed" ></TextBlock>
            <TextBlock x:Name="ErrorMessage" Grid.Row="4" Padding="4" LineHeight="12" Background="MistyRose" Visibility="Collapsed" ></TextBlock>
        </Grid>
        
    </Grid>
</UserControl>
